STEP 9: We've added a battleship appear on the stage with code that isn't in your code editor. Let's get ready to sink it!

Events run only if something happens to trigger the event. Here, the event will run when our sprites collide.

  • Click on . Drag Collision into the bottom of your program.
  • Change the name in front of .event_collision(collision) to bomb.
  • Click Run and watch what happens.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)